#include <iostream>
using std::cout;
using std::endl;

template <class T1, class T2>  
T1 add(T1 t1, T2 t2)
{
	cout << "模板一" << endl;
	return t1 + t2;
} 

template <class T1, class T2>  
T1 add(T2 t2, T1 t1)
{
	cout << "模板二" << endl;
	return t1 + t2;
}

void test0(){
    int a = 10;
    double b = 1.2;
    /* cout << add(a,b) << endl;//error */
    cout << add<int>(a,b) << endl;
    cout << add<double>(a,b) << endl;
}

int main(void){
    test0();
    return 0;
}
